<!--联系我们-->
<template>
  <div class="main">
    <div class="main_header">
      <p>联系我们</p>
    </div>
    <el-main>
      <div class="main_content">
        <p class="main_content_title">
          欢迎合作伙伴、厂商、发行商、媒体或开发者们与我们联系，共同挖掘行业价值
        </p>
        <div>
          <el-form
            :model="dynamicValidateForm"
            ref="dynamicValidateForm"
            label-width="100px"
            class="demo-dynamic"
          >
            <el-form-item
              prop="email"
              label="邮箱"
              :rules="[
                { required: true, message: '请输入邮箱地址', trigger: 'blur' },
                {
                  type: 'email',
                  message: '请输入正确的邮箱地址',
                  trigger: ['blur', 'change'],
                },
              ]"
            >
              <el-input v-model="dynamicValidateForm.email"></el-input>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" @click="submitForm('dynamicValidateForm')">
                留下你的联系方式
              </el-button>
            </el-form-item>
          </el-form>
          <p class="main_content_link">
            或 者 发 送 到 邮 件 :
            <el-link type="primary" href="mailto:bestvist@qq.com"
              >3342249453@qq.com</el-link
            >
          </p>
        </div>
      </div>
    </el-main>
  </div>
</template>

<script>
import "../../../assets/scss/we.scss";
export default {
  data() {
    return {
      dynamicValidateForm: {
        email: "",
      },
    };
  },
  methods: {
    submitForm(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.$message({
            message: "留下成功",
            type: "success",
          });
          //console.log(this.dynamicValidateForm.email);
        } else {
          this.$message.error("留不下咯");
          return false;
        }
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.demo-dynamic {
  display: flex;
  align-items: center;
  justify-content: center;
}
.main_content_link {
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
